= link_to('Return to Index', :controller => 'public', :action => 'index')

%h1 Listing Users

%table
  %tr
    %th Name
  
  - for product in @products
  %tr{:style => "background-color: #<%= cycle('CCCCCC', 'FFFFFF') %>"}
    %td= product.id
    %td= product.name
    %td= link_to('Show', :action => 'show', :id => product)
    %td= link_to('Edit', :action => 'edit', :id => product)
    %td= link_to('Destroy', { :action => 'destroy', :id => product }, :confirm => 'Are you sure?', :post => true)
  - end

= link_to('Previous page', { :page => @product_pages.current.previous }) if @product_pages.current.previous
= link_to('Next page', { :page => @product_pages.current.next }) if @product_pages.current.next
= link_to('New product', :action => 'new')
